package com.park.client.service.base;

import java.util.List;

import com.park.common.util.PageData;

public interface BaseService<T> {
	boolean deleteByPrimaryKey(Long id);

	boolean insert(T record);

	boolean insertSelective(T record);

    T selectByPrimaryKey(Long id);

    boolean updateByPrimaryKeySelective(T record);
    
    boolean updateByPrimaryKeyWithBLOBs(T record);

    boolean updateByPrimaryKey(T record);
    
	T selectByModel(T t);
    
    List<T> selectAll();
    
   /**
	 * 分页+查询
	 */
	List<T> selectPagination(T t);
	
	Integer selectTotal(T t);
	
	/**
	 * 批量插入
	 */
	boolean batchInsert(List<T> records);
	
	/**
	 * 批量更新
	 */
	int batchUpdate(List<T> records);
	
	/**
	 * 批量删除
	 */
	int batchDelete(List<T> records);
	
	boolean deleteByModel(T t);
	
	void saveOrUpdate(T t);
	
	PageData<T> queryPageData(T t);
	
}
